﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WaitInputGroup : MonoBehaviour
{
    public string mark;

    [HideInInspector]
    WaitInput nowDownWaitInput;

    public void DownInput(WaitInput waitInput)
    {
        if (nowDownWaitInput)
        {
            nowDownWaitInput.InvokeUp();
            nowDownWaitInput.IsGroupLock = true;
        }
        nowDownWaitInput = waitInput;
    }

    public void UpInput(WaitInput waitInput)
    {
        if (nowDownWaitInput && nowDownWaitInput == waitInput) 
        {
            nowDownWaitInput = null;
        }
    }
}
